package com.simsuni.concept;


public class SimEvent {
	
	public enum Type{Arrival, Begin,End};
	private Type type;
	
	private SimActivity activity;
	
	public SimActivity getActivity() {
		return activity;
	}
	public void setActivity(SimActivity activity) {
		this.activity = activity;
	}
	public SimSystemSnapShot execute(SimClock clock){
		
		if(type == Type.End){
			clock.advanceSimulationTime(activity.getDuration());
		}
		
		
		SimSystemSnapShot snapShot = new SimSystemSnapShot(clock.getSimulationTime());
		
		return snapShot;
	}
	public Type getType(){
		return type;
	}
}
